export function filterData (primary, sub) {
  if (!(primary || sub)) {
    return null
  }
  let arr = []
  for (let i = 0; i < primary.length; i++) {
    arr.push({
      item: primary[i],
      data: sub.filter(item => item.pid === primary[i].id)
    })
  }
  return arr
}
